const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const webpack = require('webpack');//这里用到必须要引用，尽管commom.js中有引用，否则会报错

module.exports = merge(common, {
    devtool: 'inline-source-map',
    devtool: "inline-source-map", //错误提示，还有sourcemap之类
    devServer: {
        contentBase: './dist',
        port: 9000,
        hot: true //开启模块热替换，css可以直接替换无需刷新，js文件需要做相应配置，不如直接点刷新
    },
    plugins: [
        new webpack.NamedModulesPlugin(),
        new webpack.HotModuleReplacementPlugin()
    ]
});